package com.dfec.water;

import com.dfec.module.system.controller.SysDataSourceController;
import com.dfec.module.system.service.impl.DbDocServiceImpl;
import com.dfec.module.system.service.impl.SysDataSourceServiceImpl;
import com.dfec.module.system.starter.DataSourceInitializer;
import com.dfec.module.system.starter.DbDocInitializer;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 *
 * @author trg
 * @title: DfServerApp
 * @projectName df-server
 * @description: 主启动类
 * @date 2023/6/1915:22
 */
@SuppressWarnings("SpringComponentScan")
@SpringBootApplication(scanBasePackages = {"${df.info.base-package}.module.*","${df.info.base-package}.**"})
@ComponentScan(value = "com.dfec",excludeFilters = {
        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {
                SysDataSourceController.class, DbDocInitializer.class ,DbDocServiceImpl.class, SysDataSourceServiceImpl.class,DataSourceInitializer.class
        })
})
@EnableScheduling
public class DfServerApp {

    public static void main(String[] args) {
        System.setProperty("pagehelper.banner","false");
        System.setProperty("es.set.netty.runtime.available.processors", "false");
        SpringApplication.run(DfServerApp.class, args);
        System.out.println("=================start successes=====================");
    }


}
